#include <iostream>
#include <ctime>
using namespace std;
typedef struct student
{
    //学生姓名
    string sname;
    //学生成绩
    int score;
}student;

typedef struct teacher
{
    string tname;
    student arr[5];
}teacher;
void fname(teacher arr[],int len){
    string s="abcde";
    srand(time(NULL));
    for(int i=0;i<len;i++){
        arr[i].tname="teacher_";
        arr[i].tname+=s[i];
        for(int j=0;j<5;j++){
            arr[i].arr[j].sname="student_";
            arr[i].arr[j].sname+=s[j];
            int score=rand()%100;
            arr[i].arr[j].score=score;
        }
    }
}
void printinof(teacher arr[],int len){
    for(int i=0;i<len;i++){
        cout<<"老师的名字："<<arr[i].tname<<endl;
        for(int j=0;j<5;j++){
            cout<<"\t学生名字："<<arr[i].arr[j].sname<<" \t学生成绩："<<arr[i].arr[j].score<<endl;
        }
    }
}
int main()
{
    teacher arr[3];
    int len=sizeof(arr)/sizeof(arr[0]);
    fname(arr,len);
    printinof(arr,len);
    return 0;
}